<template>
  <div class="container">
    <scroll-view :scroll-y="true"
                 :style="{'height': '91%'}"
                 @scroll="scroll(false)">
      <!-- 医生评价 -->
      <div class="title">请对医生做出评价</div>
      <ul class="starlist clearfix">
        <li class="eva-item clearfix">
          <div class="left">效果</div>
          <div class="right">
            <img :src="doc_effect>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_effect(1)">
            <img :src="doc_effect>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_effect(2)">
            <img :src="doc_effect>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_effect(3)">
            <img :src="doc_effect>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_effect(4)">
            <img :src="doc_effect>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_effect(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">服务</div>
          <div class="right">
            <img :src="doc_service>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_service(1)">
            <img :src="doc_service>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_service(2)">
            <img :src="doc_service>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_service(3)">
            <img :src="doc_service>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_service(4)">
            <img :src="doc_service>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_service(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">专业</div>
          <div class="right">
            <img :src="doc_professional>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_professional(1)">
            <img :src="doc_professional>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_professional(2)">
            <img :src="doc_professional>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_professional(3)">
            <img :src="doc_professional>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_professional(4)">
            <img :src="doc_professional>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_doc_professional(5)">
          </div>
        </li>
      </ul>
      <div class="evaluat"
           v-if="mark == false">
        <div class="content">
          <textarea v-if="showarea_doc"
                    @input="changedoc()"
                    v-model="doc_content"
                    maxlength="255"
                    :fixed="true"
                    class="textarea ppp"
                    :adjust-position="true"
                    auto-focus></textarea>
          <div class="textarea box_t"
               v-if="!showarea_doc"
               @tap="clickDoc(true)">{{doc_content == ''?'':doc_content}}</div>
          <span class="tip1"
                v-if="doc_content==''"
                @tap="clickDoc(true)">{{doc_content==''?'您的评价是我们前进的动力～':doc_content}}</span>
          <div class="tip">剩余{{doc_max}}字</div>
        </div>
      </div>
      <!-- 展示评论 -->
      <div class="showbox"
           v-if="mark==true && doctext!==''">
        <scroll-view scroll-y="true"
                     @scroll="scrollbox"
                     class="scroll">
          <!-- {{dataList.doctor_comment.contents}} -->
          {{doctext}}
        </scroll-view>
      </div>
      <!-- 医院评价 -->
      <div class="title">请对医院做出评价</div>
      <ul class="starlist clearfix">
        <li class="eva-item clearfix">
          <div class="left">服务</div>
          <div class="right">
            <img :src="hos_service>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_service(1)">
            <img :src="hos_service>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_service(2)">
            <img :src="hos_service>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_service(3)">
            <img :src="hos_service>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_service(4)">
            <img :src="hos_service>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_service(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">环境</div>
          <div class="right">
            <img :src="hos_environment>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_environment(1)">
            <img :src="hos_environment>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_environment(2)">
            <img :src="hos_environment>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_environment(3)">
            <img :src="hos_environment>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_environment(4)">
            <img :src="hos_environment>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_environment(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">术后关怀</div>
          <div class="right">
            <img :src="hos_care>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_care(1)">
            <img :src="hos_care>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_care(2)">
            <img :src="hos_care>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_care(3)">
            <img :src="hos_care>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_care(4)">
            <img :src="hos_care>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_hos_care(5)">
          </div>
        </li>
      </ul>
      <div class="evaluat"
           v-if="mark== false">
        <div class="content">
          <textarea v-if="showarea_hos"
                    @input="changehos()"
                    v-model="hos_content"
                    maxlength="255"
                    @blur="hos_blur(false)"
                    :fixed="true"
                    :adjust-position="true"
                    auto-focus
                    class="textarea ppp"></textarea>
          <div class="textarea box_t"
               v-else
               @tap="clickHos(true)">{{hos_content == ''?'':hos_content}}</div>
          <span class="tip1"
                v-if="hos_content==''"
                @tap="clickHos(true)">{{hos_content==''?'您的评价是我们前进的动力～':hos_content}}</span>
          <div class="tip">剩余{{hos_max}}字</div>
        </div>
      </div>
      <div class="showbox"
           v-if="mark==true && hostext!==''">
        <scroll-view scroll-y="true"
                     @scroll="scrollbox"
                     class="scroll">
          <!-- {{dataList.hospital_comment.contents}} -->
          {{hostext}}
        </scroll-view>
      </div>
      <!-- 管家评价 -->
      <div class="title">请对管家做出评价</div>
      <ul class="starlist clearfix">
        <li class="eva-item clearfix">
          <div class="left">服务</div>
          <div class="right">
            <img :src="steward_service>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_service(1)">
            <img :src="steward_service>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_service(2)">
            <img :src="steward_service>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_service(3)">
            <img :src="steward_service>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_service(4)">
            <img :src="steward_service>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_service(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">态度</div>
          <div class="right">
            <img :src="steward_attitude>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_attitude(1)">
            <img :src="steward_attitude>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_attitude(2)">
            <img :src="steward_attitude>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_attitude(3)">
            <img :src="steward_attitude>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_attitude(4)">
            <img :src="steward_attitude>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_steward_attitude(5)">
          </div>
        </li>
        <li class="eva-item clearfix">
          <div class="left">问题响应</div>
          <div class="right">
            <img :src="steward_respond>=1?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_teward_respond(1)">
            <img :src="steward_respond>=2?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_teward_respond(2)">
            <img :src="steward_respond>=3?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_teward_respond(3)">
            <img :src="steward_respond>=4?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_teward_respond(4)">
            <img :src="steward_respond>=5?'https://h5.ameimeika.com/mp_images/star/pingxing-liang@2x.png':'https://h5.ameimeika.com/mp_images/star/pingxing-hui@2x.png'"
                 alt
                 class="little_star"
                 @tap="tap_teward_respond(5)">
          </div>
        </li>
      </ul>
      <div class="evaluat"
           v-if="mark==false">
        <div class="content">
          <textarea v-if="showarea_ste"
                    @input="changeeva()"
                    v-model="eva_content"
                    maxlength="255"
                    @blur="change_status(false)"
                    :fixed="true"
                    class="textarea ppp"
                    auto-focus
                    :adjust-position="true"></textarea>
          <div class="textarea box_t"
               v-else
               @tap="clickEvent(true)">{{eva_content == ''?'':eva_content}}</div>
          <span class="tip1"
                v-if="eva_content==''"
                @tap="clickEvent(true)">{{eva_content==''?'您的评价是我们前进的动力～':eva_content}}</span>
          <div class="tip">剩余{{max_length}}字</div>
        </div>
      </div>
      <div class="showbox"
           v-if="mark == true && stewardtext !==''">
        <scroll-view scroll-y="true"
                     @scroll="scrollbox"
                     class="scroll">
          <!-- {{dataList.bulter_comment.contents}} -->
          {{stewardtext}}
        </scroll-view>
      </div>
      <picupload :picture_num="9"
                 v-on:getmsg="hasmsg"
                 v-if="!mark"></picupload>
      <div class="ul clearfix"
           v-if="mark && image_arr[0]!==''">
        <li class="item clearfix"
            v-for="(item,index) in image_arr"
            :key="index">
          <img :src="imgUrl+item"
               alt=""
               class="img clearfix">
        </li>
      </div>
    </scroll-view>
    <div class="sub-btn"
         @tap="sub_eva()"
         v-if="!mark">提交</div>
    <div class="bottom">
      <div class="btn"
           @click="delSubsidy(subsidy_id)"
           v-if="mark">删除</div>
    </div>
  </div>
</template>
<script>
import common from "@/assets/js/mmk_common.js";
import picupload from "@/components/pic_upload/pic_upload";
export default {
  data () {
    return {
      imgUrl: "https://img.ameimeika.com/",
      ImgBaseUrl: "https://h5.ameimeika.com/mp_images/",
      doc_effect: 5,  //医生效果
      doc_service: 5, //医生评价
      doc_professional: 5, //医生专业程度
      hos_service: 5, //医院服务
      hos_environment: 5, //医院环境
      hos_care: 5,  //术后关怀
      steward_service: 5, //管家服务
      steward_attitude: 5, //管家态度
      steward_respond: 5,  //管家问题响应
      doc_content: "",  //医生输入框内容
      hos_content: "",   //医院输入框
      doc_max: 255,
      hos_max: 255,
      max_length: 255,
      eva_content: "",
      image_arr: [],
      baseUrl: common.image_response,
      subsidy_id: "",
      autoFocus: false,
      showarea_doc: true,
      showarea_hos: true,
      showarea_ste: true,
      mark: false, //如果是展示页，此标记为true
      dataList: "",
      doctext: "",
      hostext: "",
      stewardtext: "",
      comment_id: ""
    };
  },
  onLoad (options) {
    wx.setNavigationBarTitle({
      title: "评价"
    });
    Object.assign(this.$data, this.$options.data());
    options.status = 0
    if (options.id) {
      this.subsidy_id = options.id;
    }
    if (options.status == 0) { //status==0 此页为评论功能
      this.mark = false;
    } else { //status==2 此页为评论展示
      this.mark = true
      this.getData()
    }
  },
  components: {
    picupload
  },
  methods: {
    // 上传照片
    hasmsg (msg) {
      this.image_arr = '';
      this.image_arr = msg;
    },
    tap_doc_effect (e) { //医生效果
      this.doc_effect = e;
    },
    tap_doc_service (e) {  //医生服务
      this.doc_service = e;
    },
    tap_doc_professional (e) { //医生专业
      this.doc_professional = e;
    },
    tap_hos_service (e) {  //医院服务
      this.hos_service = e;
    },
    tap_hos_environment (e) {  //医院环境
      this.hos_environment = e;
    },
    tap_hos_care (e) {  //医院环境
      this.hos_care = e;
    },
    tap_steward_service (e) {  //管家服务
      this.steward_service = e
    },
    tap_steward_attitude (e) {   //管家态度
      this.steward_attitude = e
    },
    tap_teward_respond (e) {  //管家问题响应
      this.steward_respond = e
    },
    sub_eva () {
      if (this.eva_content.trim() == "" && this.hos_content.trim() == "" && this.doc_content.trim() == "") {
        wx.showToast({
          title: "请至少填写一条评价内容", //提示的内容,
          icon: "none", //图标,
          duration: 2000, //延迟时间,
          mask: false, //显示透明蒙层，防止触摸穿透,
          success: res => { }
        });
      } else if ((255 - this.max_length < 15) && (255 - this.doc_max < 15) && (255 - this.hos_max < 15)) {
        wx.showToast({
          title: "评论内容不能少于15字", //提示的内容,
          icon: "none", //图标,
          duration: 2000, //延迟时间,
          mask: false, //显示透明蒙层，防止触摸穿透,
        });
      } else {
        let doc_star = [], hos_star = [], steward_star = [];
        // 医生数据 
        doc_star.push(this.doc_effect, this.doc_service, this.doc_professional);
        let docObj = {}, hosObj = {}, steObj = {};
        docObj.contents = this.doc_content;
        docObj.star = doc_star;
        let doc = JSON.stringify(docObj)
        // 医院数据
        hos_star.push(this.hos_service, this.hos_environment, this.hos_care);
        hosObj.contents = this.hos_content;
        hosObj.star = hos_star;
        let hos = JSON.stringify(hosObj)
        // 管家数据
        steward_star.push(this.steward_service, this.steward_attitude, this.steward_respond);
        steObj.contents = this.eva_content;
        steObj.star = steward_star;
        let ste = JSON.stringify(steObj)
        wx.showLoading({
          title: "提交中...", //提示的内容,
          mask: true, //显示透明蒙层，防止触摸穿透,
        });
        common.fly_post("api/v4_2/order_project/subsidy_comment", {
          id: this.subsidy_id,
          doctor: doc,
          hospital: hos,
          butler: ste,
          images: this.image_arr.join(",")
        }, result => {
          wx.hideLoading();
          let res = result.data;
          if (res.status_code == 0) {
            wx.showToast({
              title: "评价成功", //提示的内容,
              icon: "success", //图标,
              duration: 2000, //延迟时间,
              mask: true, //显示透明蒙层，防止触摸穿透,
              success: res => {
                setTimeout(() => {
                  wx.redirectTo({
                    url: '/pages/package_projects/bt_order_detail/main?str=' + this.subsidy_id
                  })
                }, 1500);
              }
            });
          } else {
            wx.showToast({
              title: res.message,
              icon: "none",
              duration: 2000,
              mask: false
            });
          }
        })
      }
    },
    // 医生
    changedoc (status) {
      this.doc_max = 255 - this.doc_content.length;
    },
    doc_blur (e) {
      this.showarea_doc = e
    },
    clickDoc (e) {
      this.showarea_doc = e
    },
    //医院
    changehos () {
      this.showarea_hos = true
      this.hos_max = 255 - this.hos_content.length;
    },
    hos_blur (e) {
      this.showarea_hos = e
    },
    clickHos (e) {
      this.showarea_hos = e
    },
    // 管家
    changeeva () {
      this.max_length = 255 - this.eva_content.length;
    },
    change_status (e) {
      this.showarea_ste = e;
    },
    clickEvent (e) {
      this.showarea_ste = e;
    },
    scroll (status) {
      this.showarea_doc = status;
      this.showarea_hos = status;
      this.showarea_ste = status;
    },
    getData () {
      common.mmk_Loading(0)
      common.fly_post("api/v4_2/order_project/comment_detail", {
        apply_id: this.subsidy_id,
      }, result => {
        common.mmk_Loading(1);
        let res = result.data;
        if (res.status_code == 0) {
          this.doc_effect = res.data.doctor_comment.effect_star;
          this.doc_service = res.data.doctor_comment.serve_star;
          this.doc_professional = res.data.doctor_comment.profession_star;
          this.hos_service = res.data.hospital_comment.serve_star;
          this.hos_environment = res.data.hospital_comment.env_star;
          this.hos_care = res.data.hospital_comment.care_star;
          this.steward_service = res.data.bulter_comment.serve_star;
          this.steward_attitude = res.data.bulter_comment.attitude_star;
          this.steward_attitudesteward_respond = res.data.bulter_comment.response_star;
          this.image_arr = res.data.images.split(',');
          this.dataList = res.data;
          this.doctext = res.data.doctor_comment.contents //医生评论
          this.hostext = res.data.hospital_comment.contents
          this.stewardtext = res.data.bulter_comment.contents
          this.comment_id = res.data.id
        } else {
          common.mmk_Loading(2, res.message);
        }
      })
    },
    delSubsidy (e) {
      wx.showModal({
        title: '', //提示的标题,
        content: '确认删除评价吗',
        success: res => {
          if (res.confirm) {
            common.mmk_Loading(0)
            common.fly_post("api/v4_2/order_project/comment_del", {
              comment_id: this.comment_id
            }, result => {
              common.mmk_Loading(1);
              let res = result.data;
              if (res.status_code == 0) {
                wx.showToast({
                  title: '删除成功', //提示的内容,
                  icon: 'success', //图标,
                  duration: 2000, //延迟时间,
                  mask: true, //显示透明蒙层，防止触摸穿透,
                  success: res => {
                    wx.navigateBack({
                      delta: 1
                    });
                  }
                });
              } else {
                common.mmk_Loading(1);
                common.mmk_Loading(2, res.message);
              }
            })
          } else if (res.cancel) {
          }
        }
      });

    },
    scrollbox (e) {
    },
  }
};
</script>

<style lang="less" scoped>
.container {
  height: 100%;
  width: 100%;
  // overflow: auto;
  background: #f3f4f6;
  padding-bottom: 60px;
  position: relative;
  .title {
    width: 100%;
    padding-left: 15px;
    line-height: 38px;
    font-size: 12px;
    font-family: "Medium";
    font-weight: 500;
    color: rgba(102, 102, 102, 1);
  }
  .starlist {
    width: 100%;
    background: rgba(255, 255, 255, 1);
    // box-shadow: 0px 1px 0px 0px rgba(204, 204, 204, 0.5);
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e2e2;
    .eva-item {
      padding: 0 15px;
      box-sizing: border-box;
      line-height: 20px;
      margin-top: 15px;
      .left {
        float: left;
        font-size: 14px;
        font-family: "PingFangSC-Regular";
        font-weight: 400;
        color: rgba(102, 102, 102, 1);
      }
      .right {
        height: 100%;
        float: right;
        .little_star {
          width: 20px;
          height: 20px;
          display: block;
          float: left;
          margin-right: 10px;
        }
      }
    }
  }
  .evaluat {
    height: 90px;
    background: rgba(255, 255, 255, 1);
    // box-shadow: 0px 1px 0px 0px rgba(204, 204, 204, 0.5);
    // margin-top: 10px;
    .header {
      line-height: 44px;
      padding-left: 15px;
      font-size: 14px;
      font-family: "PingFangSC-Regular";
      font-weight: 400;
      color: rgba(102, 102, 102, 1);
    }
    .content {
      width: 100%;
      height: 90px;
      background: #fff;
      margin: 0 auto;
      position: relative;
      .textarea {
        width: 100%;
        height: 100%;
        background: #fff;
        display: block;
        padding: 8px 10px;
        font-size: 14px;
        box-sizing: border-box;
      }
      .ppp {
        //  border: 1px solid red;
      }
      .box_t {
        // border:1px solid blue;
      }
      .tip {
        font-size: 10px;
        font-family: "PingFangSC-Regular";
        font-weight: 400;
        color: rgba(136, 136, 136, 1);
        position: absolute;
        bottom: 8px;
        right: 8px;
      }
      .tip1 {
        width: 325px;
        height: 20px;
        font-size: 14px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(153, 153, 153, 1);
        line-height: 20px;
        position: absolute;
        top: 10px;
        left: 10px;
      }
    }
  }
  .showbox {
    width: 375px;
    height: 90px;
    box-sizing: border-box;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 20px;
    color: #333;
    background-color: #fff;
    overflow: hidden;
    .scroll {
      height: 100%;
    }
  }
}
.sub-btn {
  width: 100%;
  height: 50px;
  background: rgba(246, 70, 101, 1);
  font-size: 17px;
  font-family: "Medium";
  font-weight: 500;
  line-height: 50px;
  text-align: center;
  color: rgba(255, 255, 255, 1);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
}
.ul {
  width: 100%;
  padding: 15px 5px 15px 15px;
  box-sizing: border-box;
  background-color: #fff;
  margin-top: 10px;
  margin-bottom: 74px;
  .item {
    float: left;
    width: 106px;
    height: 106px;
    margin-right: 3.477%;
    margin-bottom: 10px;
    .img {
      width: 106px;
      height: 106px;
      display: inline-block;
    }
  }
}
.bottom {
  width: 100%;
  height: 49px;
  background-color: #fff;
  box-shadow: 0px -2px 8px 0px rgba(0, 0, 0, 0.07);
  position: absolute;
  bottom: 9%;
  left: 0;
  .btn {
    width: 70px;
    height: 30px;
    border-radius: 15px;
    border: 1px solid rgba(102, 102, 102, 1);
    font-size: 12px;
    color: #666;
    line-height: 30px;
    text-align: center;
    float: right;
    margin: 8px 15px 0 0;
  }
}
</style>



